package com.dragon.mmochat.model;



import com.dragon.mmochat.model.enumType.MmochatServerStateType;

public class MmochatServerInfo implements Comparable<MmochatServerInfo> {
	private int id; // 服务器ID,终端通过ID识别服务器,不可重复或更改
	private int index; // 服务器位置
	private String name;
	private boolean newServer = false;
	private int moduleInstID; // 实例号
	private String manageUrl; // 后台地址
	private boolean isKA = false; // 是否为KA机型服务器
	// 以下为内存数据，重新加载xml时需要继承旧的数据
	private int playerNum = 0; // 玩家数
	private MmochatServerStateType state = MmochatServerStateType.未知; // 服务器状态
	private String stopMsg = null; // 维护公告
	private Long version = null;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isNewServer() {
		return newServer;
	}

	public void setNewServer(boolean newServer) {
		this.newServer = newServer;
	}

	public int getModuleInstID() {
		return moduleInstID;
	}

	public void setModuleInstID(int moduleInstID) {
		this.moduleInstID = moduleInstID;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public int getPlayerNum() {
		return playerNum;
	}

	public void setPlayerNum(int playerNum) {
		this.playerNum = playerNum;
	}

	public String getManageUrl() {
		return manageUrl;
	}

	public void setManageUrl(String manageUrl) {
		this.manageUrl = manageUrl;
	}

	public MmochatServerStateType getState() {
		return state;
	}

	public void setState(MmochatServerStateType state) {
		this.state = state;
	}

	public String getStopMsg() {
		return stopMsg;
	}

	public void setStopMsg(String stopMsg) {
		this.stopMsg = stopMsg;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Override
	public int compareTo(MmochatServerInfo arg0) {
		return index - arg0.getIndex();
	}

	public boolean isKA() {
		return isKA;
	}

	public void setKA(boolean isKA) {
		this.isKA = isKA;
	}

}
